<template>
  <div>
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      
        <el-tab-pane :label="v.name" v-for="v in tabList"  :name="v.type" :key="v.type"></el-tab-pane>
       
    </el-tabs>
    <el-row :gutter="20" type="flex">
      <el-col :span="6">
        <el-input
          placeholder="请输入资源名称"
          v-model="listQueryIn.name"
          clearable
        >
        </el-input>
      </el-col>
      <el-col :span="8">
        <el-button type="custom" @click="refreshList()" plain>搜索</el-button>
        <el-button type="custom" @click="handleAdd()">资源上传</el-button>
        <!-- <el-button type="custom" plain @click="handleIntroduction()"
          >资源简介</el-button
        > -->
      </el-col>
    </el-row>
  </div>
</template>
<script>
import Bus from "@/utils/bus.js";
export default {
  data() {
    return {
      listQueryIn: {
        name: "",
      },
      activeName:"1",
       tabList:[{
                name:'教学课件',
                type:'1'
            },{
                name:'课程教案',
                type:'2'
            },{
                name:'教学设计',
                type:'3'
            },{
                name:'资源下载',
                type:'4'
            }
            ],
    };
  },
  methods: {
    handleClick(){
       Bus.$emit("refActiveNameFilesList",this.activeName);
    },
    refreshList() {
      Bus.$emit("refreshKnowledgeFilesList", this.listQueryIn);
    },
    handleAdd() {
      Bus.$emit("showDialogKnowledgeFilesAdd");
    },
    handleIntroduction() {
      Bus.$emit("showDialogKnowledgeIntroduction");
    },
  },
};
</script>